package com.auth.manage.domain.entity;

import com.auth.manage.datasource.domain.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;

@Data
@TableName("auth_port") // 对应数据库表名
public class AuthPort extends BaseEntity {
    private Long userId;
    private Long authCodeId;
    private String authCodeCdk;
    private String ip;
    private Integer status;
    // 端口号 (1-65535)
    private Integer portNum;
    // 端口优先级
    private Long priority;
    private Long createdBy;
    private Long updatedBy;

    public void saveAuthPort(Long userId, Long authCodeId, String authCodeCdk,  Integer portNum, Long priority){
        this.userId = userId;
        this.authCodeId = authCodeId;
        this.authCodeCdk = authCodeCdk;
        this.portNum = portNum;
        this.priority = priority;
    }

}